package com.rd.student.dashuju.wangbo.LinkedListDemo1;

import java.util.LinkedList;

public class LinkedListTest02 {
    public static void main(String[] args) {
        LinkedList list = new LinkedList();
        Student11 student11 = new Student11("王博", "大数据", "数据21-3班");
        list.add(student11);
        Student11 student22 = new Student11("孙文卓", "大数据", "数据21-1班");
        list.add(student22);
        Student11 student33 = new Student11("郑睿娴", "大数据", "数据21-1班");
        list.add(student33);
        Student11 student44 = new Student11("郑成翔", "大数据", "数据21-1班");
        list.add(student44);
        Student11 student55 = new Student11("王高博", "物联网", "物联21-3班");
        list.add(student55);
        for (Object object : list) {
            System.out.println(object);
        }
    }
}

class Student11 {
    private String name;
    private String major;
    private String chassnum;

    public Student11() {
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getMajor() {
        return major;
    }

    public void setMajor(String major) {
        this.major = major;
    }

    public String getChassnum() {
        return chassnum;
    }

    public void setChassnum(String chassnum) {
        this.chassnum = chassnum;
    }

    public Student11(String name, String major, String chassnum) {
        this.name = name;
        this.major = major;
        this.chassnum = chassnum;
    }


    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", major='" + major + '\'' +
                ", chassnum='" + chassnum + '\'' +
                '}';
    }
}
